Don't place dnd cursor in placeholder text
authorMatthias Clasen <mclasen@redhat.com>
Sun, 17 Dec 2017 15:52:33 +0000 (10:52 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 17 Dec 2017 15:52:33 +0000 (10:52 -0500)
That is just misleading - the entire placeholder text is going
to be replaced by the drop.

gtk/gtkentry.c

index df603b907646a0f6f41e3b1033a4cd47fca312ef..88c9537e7ec60ba8d8600b3fac82c43604ab2eb0 100644 (file)
@@ -8983,8 +8983,11 @@ gtk_entry_drag_motion (GtkWidget        *widget,
       priv->dnd_position = -1;
     }
 
+  if (show_placeholder_text (entry))
+    priv->dnd_position = -1;
+
   gdk_drag_status (context, suggested_action, time);
-  if (priv->dnd_position == -1)
+  if (suggested_action == 0)
     gtk_drag_unhighlight (widget);
   else
     gtk_drag_highlight (widget);